package com.edfu.core.contentmgt.jcr.service.api;

import java.io.File;
import java.io.InputStream;
import java.util.List;
import java.util.Map;

import com.edfu.core.contentmgt.jcr.vo.Content;
import com.edfu.core.contentmgt.jcr.vo.Version;

public interface IContentMgtService {
	
	public static final String DEFAULT_VERSION_NUMBER = "1.0";
	public static final String INVALID_DIRECTORY_NAME = "Invalid Directory Name";
	public static final String INVALID_FILE_NAME = "Invalid File Name";
	public static final String INVALID_FILE_UUID = "Invalid File UUID";
	public static final String INVALID_USER_CONTEXT = "Invalid User Context";
	public static final String NO_SUCH_FILE_WITH_NAME = "No Such File With Name";
	public static final String NO_SUCH_FILE_WITH_UUID = "No Such File With UUID";
	public static final String NO_SUCH_DIRECTORY_WITH_NAME = "No Such Directory With Name";
	public static final String NULL_FILE_STREAM="File stream is null";
	
	public Content addDirectory(String fullyQualifiedDirectoryName);
	
	public Content addDirectory(String fullyQualifiedDirectoryName, Map<String,String> properties);

	public Content addFile(String fullyQualifiedFileName, InputStream is);

	public Content addFile(String fullyQualifiedFileName,
			Map<String, String> properties, InputStream is);

	public Content addFile(String fullyQualifiedFileName, File file);

	public Content addFile(String fullyQualifiedFileName,
			Map<String, String> properties, File file);

	public Version addVersion(String fullyQualifiedFileName,
			String versionNumber, Map<String, String> properties, InputStream is);

	public Version addVersion(String fullyQualifiedFileName, InputStream is);

	public Version addVersion(String fullyQualifiedFileName,
			String versionNumber, Map<String, String> properties, File file);

	public Version addVersion(String fullyQualifiedFileName, File file);

	public void deleteDirectory(String fullyQualifiedDirectoryName);

	public void deleteFile(String fullyQualifiedFileName);

	public void deleteFile(String fullyQualifiedFileName, String versionNumber);

	public InputStream getFileAsStreamFromPath(String fullyQualifiedFileName);

	public InputStream getFileAsStreamFromPath(String fullyQualifiedFileName,
			String versionNumber);

	public InputStream getFileAsStreamFromUUID(String uuid);

	public InputStream getFileAsStreamFromUUID(String uuid, String versionNumber);

	public Content getFileDetailsFromUUID(String uuid);

	public Version getFileDetailsFromUUID(String uuid, String versionNumber);

	public Content getFileDetailsFromPath(String fullyQualifiedFileName);

	public Version getFileDetailsFromPath(String fullyQualifiedFileName,
			String versionNumber);

	public Version addFilePropertiesUsingPath(String fullyQualifiedFileName,
		 Map<String, String> properties);

	public Version addFilePropertiesUsingUUID(String uuid,
			Map<String, String> properties);

	public List<Version> getAllVersions(String filePath );
	
	public List<Content> getChildren( String parentAbsolutePath ) ;

	public void deleteFileWithUUID(String uuid);
	
}
